<template>
	<view class="page-body">
		<view class="page-section page-section-gap">
			<map style="width: 100%; height: 100%;"
			 @markertap="markertap" 
			 :latitude="latitude" 
			 :longitude="longitude" 
			 :markers="covers">
			</map>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: 23, // 使用 marker点击事件 需要填写id
				title: 'map',
				latitude: 39.909,
				longitude: 116.39742,
				covers: [{
					latitude: 39.909,
					longitude: 116.39742,
					iconPath: '../../static/location0.svg',
					width:30,
					height:36,
					id: 2323214214
				}, {
					latitude: 39.90,
					longitude: 116.39,
					iconPath: '../../static/location1.svg',
					width:30,
					height:36,
					id: 44444444
				}]
			}
		},
		methods: {
			markertap: function (e) {
				const { markerId } = e;
				uni.navigateTo({
				    url: `../recordQuery/recordQuery?${markerId}`
				});
			}
			
		}
	}
</script>

<style scoped>
	.page-body {
		width: 100%;
		height: calc(100vh + 44rpx);
		overflow: hidden;
	}
	.page-section {
		width: 100%;
		height: 100%;
	}
</style>
